#include <iostream>
using namespace std;

class Test {
  private:
    static int num;

  public:
    Test() { num++; }
    ~Test() { num--; }
    static void ShowObjectNum() { cout << num << endl; }
};

int Test::num = 0; // 静态数据成员的初始化为0

int main(void) {
    Test::ShowObjectNum();
    Test obj;
    Test::ShowObjectNum();

    return 0;
}
